home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / intrfc61.arc / TEST1.PAS < prev    next >
Pascal/Delphi Source File  |  1991-03-28  |  1KB  |  82 lines

  1. {$N+} unit test1;
  2.  
  3. interface
  4.  
  5. type
  6.   type1 = array[1..5] of byte;
  7.  
  8.   type2 = record
  9.     b1 : byte;
  10.     b2 : byte;
  11.   end;
  12.  
  13.   type3 = object
  14.     b1 : byte;
  15.     b2 : byte;
  16.     constructor c(a1,a2:byte);
  17.     destructor  d;
  18.     procedure m;
  19.     procedure v; virtual;
  20.  
  21.     private
  22.  
  23.     pb1 : byte;
  24.     procedure pm;
  25.     procedure pv; virtual;
  26.   end;
  27.  
  28.   type4 = file of byte;
  29.  
  30.   type5 = text;
  31.  
  32.   type6 = function : byte;
  33.  
  34.   type7 = set of byte;
  35.  
  36.   type8 = ^byte;
  37.  
  38.   type9 = string;
  39.  
  40.   type10 = comp;
  41.  
  42.   type11 = real;
  43.  
  44.   type12 = 1..6;
  45.  
  46.   type13 = boolean;
  47.  
  48.   type14 = char;
  49.  
  50.   type15 = (red, green, blue);
  51.  
  52. var
  53.   v : byte;
  54.   a : word absolute v;
  55. const
  56.   tc : byte = 1;
  57.   { These constants should all be printable }
  58.   i = 1;
  59.   b = true;
  60.   s = 'This is a string';
  61.   f = 1.23;
  62.   c = 'A';
  63.  
  64. procedure proc(v : byte; var r : byte);
  65.  
  66. function  fun(v : byte; var r : byte) : byte;
  67.  
  68. implementation
  69.     constructor type3.c;  begin write('1') end;
  70.     destructor  type3.d;  begin write('12') end;
  71.     procedure   type3.m;  begin write('123') end;
  72.     procedure   type3.v;  begin end;
  73.     procedure   type3.pm; begin end;
  74.     procedure   type3.pv; begin end;
  75.     procedure   proc;
  76.     var
  77.       a : word absolute v;
  78.     begin end;
  79. {$i test1.inc}
  80. end.
  81.  
  82.